package com.hxkj.controller;

import com.hxkj.domain.po.MessageSetting;
import com.hxkj.service.MessageSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Callable;

@RestController
@RequestMapping(value = "/messageSetting")
public class MessageSettingController {

    @Autowired
    private MessageSettingService msService;

    @RequestMapping(value = "/userMessageSetting")
    public void userMessageSetting(MessageSetting messageSetting) throws Exception{
        msService.userMessageSetting(messageSetting);
    }

    @RequestMapping(value = "/getMessageSetting")
    public Callable<MessageSetting> getMessageSetting(MessageSetting messageSetting) throws Exception{
        return () -> msService.getMessageSetting(messageSetting);
    }
}
